import {lazy} from "react"
import {RootList} from "../untils/index"

export let mainrouter:RootList=[{
  path:"/index/home",
  element:lazy(()=>import("../page/index/Home")),
  title:"首页",
  icon:'UploadOutlined'
},{
  path:"/index/earths",
  element:lazy(()=>import("../page/index/Earths")),
  title:"画图",
  icon:'UserOutlined'
},{
  path:"/index/nav",
  element:lazy(()=>import("../page/index/Nav")),
  title:"导航",
  icon:'VideoCameraOutlined'
},{
  path:"/index/classfy",
  element:lazy(()=>import("../page/index/Classfy")),
  title:"分类",
  icon:'UploadOutlined'
}]
const routes:RootList=[{
  path:"/index",
  element:lazy(()=>import("../page/Index")),
  children:mainrouter
},{
  path:"*",
  element:lazy(()=>import("../page/Error"))
},{
  path:"/login",
  element:lazy(()=>import("../page/Login"))
},{
  path:"/",
  to:'/index/home'
}]

export default routes